<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Список записей</title>
    <!-- Подключение стилей (замените на свои стили или Bootstrap) -->
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
    <style>
        body {
            font-family: Arial, sans-serif;
            background-color: #f8f9fa;
            margin: 0;
            padding: 0;
        }

        .container {
            max-width: 800px;
            margin: 20px auto;
            background-color: #fff;
            padding: 20px;
            border-radius: 8px;
            box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
        }

        p {
            margin: 0;
            padding: 10px;
            border-bottom: 1px solid #ccc;
        }

        a {
            text-decoration: none;
            color: #007bff;
            font-weight: bold;
        }

        a:hover {
            color: #0056b3;
        }

        .pagination {
            display: flex;
            justify-content: center;
            margin-top: 20px;
        }

        .pagination a {
            color: #007bff;
            padding: 8px 16px;
            text-decoration: none;
            border: 1px solid #007bff;
            border-radius: 4px;
            margin: 0 4px;
        }

        .pagination .current {
            background-color: #007bff;
            color: #fff;
            border: 1px solid #007bff;
            border-radius: 4px;
            padding: 8px 16px;
            margin: 0 4px;
        }

        .search-button {
            display: block;
            margin: 20px auto;
            padding: 10px 20px;
            background-color: #007bff;
            color: #fff;
            border: none;
            border-radius: 4px;
            cursor: pointer;
            text-decoration: none;
            font-weight: bold;
        }

        .search-button:hover {
            background-color: #0056b3;
        }
    </style>
</head>
<body>

{% block content %}
<div class="container">
    <a href="{% url 'search_results' %}" class="search-button">Перейти к поиску</a>

    <div class="container">
        <form action="{% url 'search_list' %}" method="get" class="search-form">
            {{ filter.form.as_ul }}
            <li><input type="submit" class="btn btn-success" value="Search"></li>
        </form>
    </div>

    <div class="container">
        {% for list in object_list %}
        <p><a href="{% url 'list_detail' list.pk %}">{{ list.name }} {{ list.firstname }} {{ list.midname }}</a></p>
        {% endfor %}
    </div>

</div>

{% endblock content%}

{% include "paginations.html" %}

</body>
</html>
